#include "GameObject.h"
#include "Game.h"
#include "Timer.h"

namespace Engine
{
	unsigned int GameObject::s_currentGameObjectID = 1;

	GameObject::GameObject():m_initialized(false)
	{
		m_gameObjectID = s_currentGameObjectID;
		++s_currentGameObjectID;
	}

	void GameObject::Initialize()
	{
		TheGame::Instance() ->RegisterGameObject(this);
	}

	void GameObject::Release()
	{
		TheGame::Instance() ->UnregisterGameObject(GetGameObjectID());
	}

	GameObject::~GameObject()
	{
		TheGame::Instance() ->UnregisterGameObject(GetGameObjectID());
	}
}